#include <myheader_c_plus.h>
using std::vector;
using std::cout;
using std::endl;
using std::list;
using std::deque;
template<typename Container>
void display(const Container &con){
    for(auto & ele: con){
        cout << ele << " ";
    }
    cout << endl;
}

void test(){
    list<int> li = {1,2,3,4,5,6,7,8,9,10};
    list<int>::iterator it = li.begin();
    ++it;
    ++it;
    li.insert(it, 1000);
    display(li);
    cout << "it = " << *it << endl;
    li.insert(it, 500);
    display(li);
    cout << "it = " << *it << endl;
    li.insert(it, 400);
    display(li);
    cout << "it = " << *it << endl;

}

void test1(){
    deque<int> qu = {1,2,3,4,5,6,7,8,9,10};
    deque<int>::iterator it = qu.begin();
    ++it;
    ++it;
    display(qu);
    qu.insert(it, 100);
    display(qu);
    cout << "it = " << *it << endl;
    qu.insert(it, 100);
    display(qu);
    cout << "it = " << *it << endl;
    qu.insert(it, 100);
    display(qu);
    cout << "it = " << *it << endl;
    qu.insert(it, 100);
    display(qu);
    cout << "it = " << *it << endl;
    qu.insert(it, 100);
    display(qu);
    cout << "it = " << *it << endl;
    qu.insert(it, 100);
    display(qu);
    cout << "it = " << *it << endl;
    qu.insert(it, 100);
    display(qu);
    cout << "it = " << *it << endl;
}

void test3(){
    deque<int> qu = {1,2,3,4,5,6,7,8,9,10};
    vector<double> vec = {1.1,2.1,3.1,4.1};
    vector<int> vec1 = {1,2,3,4,5};
    /*
     * ++it;
     * vec.insert(it, 100);
     * display(vec);
     * cout << "it = " << *it << endl;
     * vec.insert(it, 100);
     * display(vec);
     * cout << "it = " << *it << endl;
     * vec.insert(it, 100);
     * display(vec);
     * cout << "it = " << *it << endl;
     */

}
int main(int argc, char *argv[])
{
    test3();
    return 0;
}

